<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Struts2 adn Hibernate Hello World</title>
</head>
<body>

	<h1>Guitas Database</h1>
	<s:actionerror />

	<s:form action="add" method="post">
		<s:textfield name="guitar.brand" label="Brand" />
		<s:textfield name="guitar.model" label="Model" />
		<s:textfield name="guitar.manufactureDate" label="Manufacture Date" />
		<s:textfield name="guitar.price" label="Price" />
		<s:submit value="Add Guitar" align="center" />
	</s:form>

	<h2>Guitars</h2>
	<table>
		<tr>
			<th>Brand</th>
			<th>Model</th>
			<th>Manufacture Date</th>
			<th>Price</th>
		</tr>
		<s:iterator value="guitars" var="guitar">
			<tr>
				<td><s:property value="brand" /></td>
				<td><s:property value="model" /></td>
				<td><s:property value="manufactureDate" /></td>
				<td><s:property value="price" /></td>
				<td><a href="delete?id=<s:property value="id"/>">Delete</a></td>
			</tr>
		</s:iterator>
	</table>
</body>
</html>